<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head th:replace="admin/_fragments :: head(~{::title})">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <link rel="stylesheet" href="../../static/semantis-ui/semantic.min.css">
    <script type="text/javascript" src="../../static/semantis-ui/jquery-3.6.0.js"></script>
    <script src="../../static/semantis-ui/semantic.min.js"></script>
    <link rel="stylesheet" href="../../static/css/me.css">
    <title>博客管理登录</title>
</head>
<body>

<!--登录模块-->
<div class="m-container-small m-padded-d-mass02 " style="max-width: 30em !important;">
    <div class="ui container">
        <div class="column">
            <h2 class="ui teal image header">
                <div class="content">
                    后台登录
                </div>
            </h2>
            <form class="ui large form" action="#" method="post" th:action="@{/admin/login}">
                <div class="ui stacked segment">
                    <div class="field">
                        <div class="ui left icon input">
                            <i class="user icon"></i>
                            <input type="text" name="username" placeholder="用户名...">
                        </div>
                    </div>
                    <div class="field">
                        <div class="ui left icon input">
                            <i class="lock icon"></i>
                            <input type="password" name="password" placeholder="密码...">
                        </div>
                    </div>
                    <button class="ui fluid large teal submit button">登 录</button>
                </div>

                <div class="ui error message"></div>
                <!--th:unless="${#strings.isEmpty(message)}" th:text="${message}} 没通过Controller的话会 进行判断  为空的显示信息-->
                <div class="ui mini negative message" th:unless="${#strings.isEmpty(message)}" th:text="${message}">用户名和密码错误
                </div>
            </form>
        </div>
    </div>

</div>

<!--底部      m-padded-d-mass间隔-->
<footer class="ui segment inverted vertical segment m-padded-d-mass bg">
    <!--container容器 center aligned居中-->
    <div class="ui center aligned container bg">
        <!--grid会把一些布局分为12列  devided加线 -->
        <div class="ui inverted divided grid bg">
            <div class="three wide column m-opacity-mini m-text-space m-text-thin m-text-lined">
                <div class="ui inverted link list bg">
                    <img src="./static/image/wo.jpg" th:src="@{/image/wo.jpg}"  alt="" class="ui rounded image" style="width:110px">

                </div>
            </div>
            <div class="three wide column m-opacity-mini m-text-space m-text-thin m-text-lined">
                <h4 class="ui inverted header">最新博客</h4>
                <div class="ui inverted link list ">
                    <a href="#" class="item">会飞的羊</a>
                    <a href="#" class="item">会飞的羊</a>
                    <a href="#" class="item">会飞的羊</a>
                </div>
            </div>
            <div class="three wide column m-opacity-mini m-text-space m-text-thin m-text-lined">
                <h4 class="ui inverted header">联系我吖</h4>
                <div class="ui inverted link list">
                    <a href="#" class="item">QQ:822021336</a>
                    <a href="#" class="item">邮箱：xihao.luck@qq.com</a>
                    <a href="#" class="item"></a>
                </div>
            </div>
            <div class="seven wide column">
                <h4 class="ui inverted header m-opacity-mini m-text-space m-text-thin m-text-lined">最新博客</h4>
                <p class="m-opacity-mini m-text-space m-text-thin m-text-lined">
                    这是我的个人博客，用于记录我在网上收集的文章，自己的代码笔记，和优秀的文案等等。欢迎大家关注！</p>
            </div>
        </div>
        <div class="ui inverted section divider m-opacity-mini m-text-space m-text-thin m-text-lined "></div>
        <p class="m-opacity-mini m-text-space m-text-thin m-text-lined">Copyright © 2021-2022 会飞的羊 </p>
    </div>

</footer>


<!--jquery-->

<script>
    <!--点击.menu.toggle按钮加入m-mobile-hide样式-->
    $('.menu.toggle').click(function () {
        $('.m-item').toggleClass('m-mobile-hide')
    });

    $('.ui.dropdown')
        .dropdown();
    // 非空验证
    $('.ui.form').form({
        fields : {
            // 指定name为title区域
            username : {
                //indentifier:'title',寻找name为title的框
                identifier: 'username',
                rules: [
                    {
                        type: 'empty',
                        prompt: '请输入账号'
                    }
                ]
            },
            password: {
                //indentifier:'title',寻找name为title的框
                identifier: 'password',
                rules: [
                    {
                        type: 'empty',
                        prompt: '请输入密码'
                    }
                ]
            }
        }
    })

</script>
</body>
</html>